#include "spinbox.h"
#include "ui_spinbox.h"

#include <QDebug>

SpinBox::SpinBox(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::SpinBox)
{
    ui->setupUi(this);

    ui->spinBox->setRange(1, 5);
    ui->spinBox_2->setRange(1, 5);
    ui->spinBox_3->setRange(1, 5);

    ui->spinBox->setValue(1);
    ui->spinBox_2->setValue(1);
    ui->spinBox_3->setValue(1);
}

SpinBox::~SpinBox()
{
    delete ui;
}

void SpinBox::on_pushButton_clicked()
{
    qDebug() << ui->comboBox->currentText() << ": " << ui->spinBox->value()  << "个\n"
             << ui->comboBox_2->currentText() << ": " << ui->spinBox_2->value()  << "个\n"
             << ui->comboBox_3->currentText() << ": " << ui->spinBox_3->value()  << "个";
}
